package com.hzye.framework.common.util;

import java.util.regex.Pattern;

public class ParamsValidate {
	public static boolean isMobile(String mobile) {
		boolean b = false;
		if (mobile != null) {
			String pattern = "1[3-9]\\d{9}";
			b = Pattern.matches(pattern, mobile);
		}
		return b;
	}

	public static boolean isMac(String validateInfo) {
		boolean b = false;
		if (validateInfo != null) {
			String pattern = "[a-fA-F0-9]{2}:[a-fA-F0-9]{2}:[a-fA-F0-9]{2}:[a-fA-F0-9]{2}:[a-fA-F0-9]{2}:[a-fA-F0-9]{2}";
			b = Pattern.matches(pattern, validateInfo);
		}
		return b;
	}

	public static boolean isMac2(String validateInfo) {
		boolean b = false;
		if (validateInfo != null) {
			String pattern = "[a-fA-F0-9]{2}-[a-fA-F0-9]{2}-[a-fA-F0-9]{2}-[a-fA-F0-9]{2}-[a-fA-F0-9]{2}-[a-fA-F0-9]{2}";
			b = Pattern.matches(pattern, validateInfo);
		}
		return b;
	}

	public static void main(String[] args) {
		System.out.println(isMac2("F0-DE-F1-76-3C-B3"));
	}
}